package com.zb.entity;

import javax.persistence.*;

import com.zb.util.annotation.PrimaryKey;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by pengyu on 2017/5/12.
 */
// @Entity
// @Table(name = "oms_customer", schema = "oms", catalog = "")
@Table(name = "oms_customer")
public class OmsCustomer implements Serializable, Cloneable {
	private String weixin_account;
	private String phone;
	@PrimaryKey
	private String user_pay_card;
	private String customer_name;
	private Integer org_no;
	private String org_name;
	private String nick_name;
	private String password;
	private Byte sex;
	private String pin;
	private BigDecimal amount;
	private Integer score;
	private Date auth_time;
	private Date modify_time;
	private Date lastlogin_time;
	private byte valid_flag;

	public String getWeixin_account() {
		return weixin_account;
	}

	public void setWeixin_account(String weixin_account) {
		this.weixin_account = weixin_account;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getUser_pay_card() {
		return user_pay_card;
	}

	public void setUser_pay_card(String user_pay_card) {
		this.user_pay_card = user_pay_card;
	}

	public String getCustomer_name() {
		return customer_name;
	}

	public void setCustomer_name(String customer_name) {
		this.customer_name = customer_name;
	}

	public Integer getOrg_no() {
		return org_no;
	}

	public void setOrg_no(Integer org_no) {
		this.org_no = org_no;
	}

	public String getOrg_name() {
		return org_name;
	}

	public void setOrg_name(String org_name) {
		this.org_name = org_name;
	}

	public String getNick_name() {
		return nick_name;
	}

	public void setNick_name(String nick_name) {
		this.nick_name = nick_name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Byte getSex() {
		return sex;
	}

	public void setSex(Byte sex) {
		this.sex = sex;
	}

	public String getPin() {
		return pin;
	}

	public void setPin(String pin) {
		this.pin = pin;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	public Date getAuth_time() {
		return auth_time;
	}

	public void setAuth_time(Date auth_time) {
		this.auth_time = auth_time;
	}

	public Date getModify_time() {
		return modify_time;
	}

	public void setModify_time(Date modify_time) {
		this.modify_time = modify_time;
	}

	public Date getLastlogin_time() {
		return lastlogin_time;
	}

	public void setLastlogin_time(Date lastlogin_time) {
		this.lastlogin_time = lastlogin_time;
	}

	public byte getValid_flag() {
		return valid_flag;
	}

	public void setValid_flag(byte valid_flag) {
		this.valid_flag = valid_flag;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((amount == null) ? 0 : amount.hashCode());
		result = prime * result + ((auth_time == null) ? 0 : auth_time.hashCode());
		result = prime * result + ((customer_name == null) ? 0 : customer_name.hashCode());
		result = prime * result + ((lastlogin_time == null) ? 0 : lastlogin_time.hashCode());
		result = prime * result + ((modify_time == null) ? 0 : modify_time.hashCode());
		result = prime * result + ((nick_name == null) ? 0 : nick_name.hashCode());
		result = prime * result + ((org_name == null) ? 0 : org_name.hashCode());
		result = prime * result + ((org_no == null) ? 0 : org_no.hashCode());
		result = prime * result + ((password == null) ? 0 : password.hashCode());
		result = prime * result + ((phone == null) ? 0 : phone.hashCode());
		result = prime * result + ((pin == null) ? 0 : pin.hashCode());
		result = prime * result + ((score == null) ? 0 : score.hashCode());
		result = prime * result + ((sex == null) ? 0 : sex.hashCode());
		result = prime * result + ((user_pay_card == null) ? 0 : user_pay_card.hashCode());
		result = prime * result + valid_flag;
		result = prime * result + ((weixin_account == null) ? 0 : weixin_account.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OmsCustomer other = (OmsCustomer) obj;
		if (amount == null) {
			if (other.amount != null)
				return false;
		} else if (!amount.equals(other.amount))
			return false;
		if (auth_time == null) {
			if (other.auth_time != null)
				return false;
		} else if (!auth_time.equals(other.auth_time))
			return false;
		if (customer_name == null) {
			if (other.customer_name != null)
				return false;
		} else if (!customer_name.equals(other.customer_name))
			return false;
		if (lastlogin_time == null) {
			if (other.lastlogin_time != null)
				return false;
		} else if (!lastlogin_time.equals(other.lastlogin_time))
			return false;
		if (modify_time == null) {
			if (other.modify_time != null)
				return false;
		} else if (!modify_time.equals(other.modify_time))
			return false;
		if (nick_name == null) {
			if (other.nick_name != null)
				return false;
		} else if (!nick_name.equals(other.nick_name))
			return false;
		if (org_name == null) {
			if (other.org_name != null)
				return false;
		} else if (!org_name.equals(other.org_name))
			return false;
		if (org_no == null) {
			if (other.org_no != null)
				return false;
		} else if (!org_no.equals(other.org_no))
			return false;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		if (phone == null) {
			if (other.phone != null)
				return false;
		} else if (!phone.equals(other.phone))
			return false;
		if (pin == null) {
			if (other.pin != null)
				return false;
		} else if (!pin.equals(other.pin))
			return false;
		if (score == null) {
			if (other.score != null)
				return false;
		} else if (!score.equals(other.score))
			return false;
		if (sex == null) {
			if (other.sex != null)
				return false;
		} else if (!sex.equals(other.sex))
			return false;
		if (user_pay_card == null) {
			if (other.user_pay_card != null)
				return false;
		} else if (!user_pay_card.equals(other.user_pay_card))
			return false;
		if (valid_flag != other.valid_flag)
			return false;
		if (weixin_account == null) {
			if (other.weixin_account != null)
				return false;
		} else if (!weixin_account.equals(other.weixin_account))
			return false;
		return true;
	}

}
